import {v4} from 'uuid'
export const getMenus = (config) => {
  const { username, password } = config
  console.log('username, password', username, password)
    if (username == 'admin' && password == 'admin') {
      return {
        code: 1,
        token: v4(),
        data: [
          {
            path: '/home',
            name: 'home',
            label: '首页',
            icon: 'HomeOutlined',
            url: '/home'
          },
          {
            path: '/mall',
            name: 'mall',
            label: '商品管理',
            icon: 'HomeOutlined',
            url: '/mall'
          },
          {
            path: '/user',
            name: 'user',
            label: '用户管理',
            icon: 'HomeOutlined',
            url: '/user'
          },
          {
            path: '/chart',
            name: 'chart',
            label: '统计图',
            icon: 'HomeOutlined',
            url: '/chart'
          },
          {
            path: '/other',
            name: 'other',
            label: '其他',
            icon: 'HomeOutlined',
            url: '/other/pageOne',
            children: [
              {
                path: '/pageOne',
                name: 'pageOne',
                label: '按钮级指令',
                url: '/other/pageOne'
              },
              {
                path: '/pageTwo',
                name: 'pageTwo',
                label: '饼状图',
                url: '/other/pageTwo'
              },
              {
                path: '/pageThree',
                name: 'pageThree',
                label: '折线图',
                url: '/other/pageThree'
              },
              {
                path: '/pageFour',
                name: 'pageFour',
                label: '柱状图',
                url: '/other/pageFour'
              }
            ]
          }
        ]
      }
    } else {
      return {
        code: -1,
        message: '账号或密码不正确'
      }
    }
}